//
//  collect_commodity_Cell.m
//  pmmSS
//
//  Created by Mac book on 2017/9/22.
//  Copyright © 2017年 WTFSSD. All rights reserved.
//

#import "collect_commodity_Cell.h"

@implementation collect_commodity_Cell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle: style reuseIdentifier:reuseIdentifier]) {
        [self initSubViews];
    }
    return  self;
}

-(void)initSubViews{

    WeakSelf(weakSelf);

    _iconImageView =  [[UIImageView alloc] init];

   // _iconImageView.backgroundColor = RGBA(253, 138, 40, 1);
    [_iconImageView setImage:[UIImage imageNamed:@"list_icon_shop"]];

    [self.contentView addSubview:_iconImageView];

    [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf.contentView);
        make.left.mas_equalTo(autoScaleW(10));
        make.width.mas_equalTo(autoScaleW(50));
        make.height.mas_equalTo(autoScaleH(50));
        
    }];

    _title_Label = [ HMLabel createLabelWithText:@"撒大声地gas的嘎胜多负少" andTextColor:[UIColor blackColor]andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(14)] andTextAlignment:NSTextAlignmentLeft];

    [self.contentView addSubview:_title_Label];

    [_title_Label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.top.mas_equalTo(weakSelf.contentView).offset(autoScaleH(10));
        make.left.mas_equalTo(autoScaleW(75));
        make.right.mas_equalTo(autoScaleW(-30));


    }];
    _icon_price_label  = [ HMLabel createLabelWithText:@"￥" andTextColor:RGBA(252,74,0,1) andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(12)] andTextAlignment:NSTextAlignmentLeft];

    [self.contentView addSubview:_icon_price_label];


    [_icon_price_label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.left.mas_equalTo(weakSelf.contentView).offset(autoScaleW(75));
        make.bottom.mas_equalTo(weakSelf.iconImageView).offset(autoScaleH(-3));
        make.width.mas_equalTo(autoScaleW(10));
        make.height.mas_equalTo(autoScaleH(17));
    }];

    _price_Label = [ HMLabel createLabelWithText:@"4564654643" andTextColor:RGBA(252,74,0,1) andBgColor:nil andFont:[UIFont fontWithName:default_fontname size:autoScaleW(14)] andTextAlignment:NSTextAlignmentLeft];

    [self.contentView addSubview:_price_Label];

    [_price_Label mas_makeConstraints:^(MASConstraintMaker *make) {

        make.bottom.mas_equalTo(weakSelf.iconImageView).offset(autoScaleH(-3));
        make.left.mas_equalTo(autoScaleW(75 + 15));
        make.right.mas_equalTo(autoScaleW(-30));

    }];


    UIImageView *rightImage = [[UIImageView alloc]init];

    [rightImage setImage:[UIImage imageNamed:@"icon_arrow_right_gray"]];
    [self.contentView addSubview:rightImage];

    [rightImage mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerY.mas_equalTo(weakSelf.contentView);
        make.right.mas_equalTo(weakSelf.contentView).offset(autoScaleW(-15));
        make.height.mas_equalTo(autoScaleW(11));

        make.width.mas_equalTo(autoScaleH(6));
        
    }];


}
-(void)layoutSubviews{
    
    
}

@end
